<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2017/11/10
  Time: 11:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <base href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">
    <title>查询结果</title>
</head>
<body>
<h3 align="center">查询结果</h3>
<table cellpadding="0" cellspacing="0" border="1">
    <tr>
        <td>车次</td>
        <td>初始站</td>
        <td>终点站</td>
        <td>票价</td>
    </tr>
    <c:if test="${not empty result}">

        <tr>
            <td>${result['trainNum']}</td>
            <td>${result['startStation']}</td>
            <td>${result['endStation']}</td>
            <td>${result['price']}</td>
        </tr>

    </c:if>
    <c:if test="${empty result}">
        <tr >
            <td colspan="4" style="color: red">没有合适的数据</td>
        </tr>
    </c:if>
</table>

</body>
</html>